<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('member','header'); ?>
<script language="JavaScript">
function checkform(money)
{
    if(money > 0)
{
    alert('余额不足，请先充值！');
return false;
}
return true;
}
</script>
<div id="main">
  <?php include template('order' , 'left'); ?>
  <div id="right">
    <p id="position"><strong>当前位置：</strong><a href="">首页</a><a href="<?php echo $MODULE['member']['url'];?>">会员中心</a><a href="<?php echo $M['url'];?>">订单</a>确认付款</p>
    <div class="clear"></div>
    <table cellpadding="0" cellspacing="1" class="table_list">
      <caption>订单信息</caption>
<tr>
           <th>产品</th>
           <th width="12%">单价</th>
           <th width="8%">数量</th>
           <th width="10%">运费</th>
           <th width="10%">总价</th>
        </tr>
<tr>
            <td class="align_l"><a href="<?php echo $goodsurl;?>"><?php echo $goodsname;?></a></td>
            <td><?php echo $price;?>元/<?php echo $unit;?></td>
            <td><?php echo $number;?><?php echo $unit;?></td>
            <td><?php echo $carriage;?>元</td>
            <td><?php echo $amount;?>元</td>
        </tr>
</table>
<form name="myform" action="<?php echo $M['url'];?>index.php?action=pay&orderid=<?php echo $orderid;?>" method="post" onsubmit="return checkform(<?php echo $money;?>)">
    <table cellpadding="0" cellspacing="1" class="table_info">
      <caption>确认付款</caption>
<tr>
           <th width="15%">付款金额：</th>
           <td style="color:red;font-size:14px;font-weight:bold;"><?php echo $amount;?> 元</td>            
        </tr>
        <tr>
          <th>帐户余额：</th>
          <td style="color:blue"><?php echo $_amount;?> 元 <?php if($_amount < $amount) { ?>&nbsp;&nbsp;&nbsp;&nbsp;账户余额不够，请<a href="<?php echo $MODULE['pay']['url'];?>showpayment.php?action=type&pay=online&amount=<?php echo $money;?>&forward=<?php echo urlencode(URL);?>" style="color:red">立即充值</a>。<?php } ?></td>
        </tr>
        <tr>
          <th></th>
          <td><input type="submit" name="dosubmit" value="确认付款"></td>
        </tr>
</table>
    </form>
  </div>
</div>
<div class="clear"></div>
<?php include template('member','footer'); ?>
